<%@ page import="com.xiaolin.utils.dbUtils" %>
<%@ page import="java.sql.Connection" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2023/1/2
  Time: 13:23
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>首页</title>
    <link href="css/HomePage.css" rel="stylesheet" type="text/css">
    <%--    <link href="css/HomePage.css" type="text/css">--%>
    <script type="text/javascript" src="jsp/script/jquery-1.7.2.js"></script>
    <script type="text/javascript">
        $(function () {
            $("#a1").click(function () {
                $("#shopp").text('全部商品')
                $("#iframe").attr('src','jsp/ShoppShown.jsp?num=1&name=<%=request.getParameter("name")%>');
            })
            $("#a2").click(function () {
                $("#shopp").text('书籍')
                $("#iframe").attr('src','jsp/ShoppShown.jsp?num=2&name=<%=request.getParameter("name")%>');
            })
            $("#a3").click(function () {
                $("#shopp").text('电脑')
                $("#iframe").attr('src','jsp/ShoppShown.jsp?num=3&name=<%=request.getParameter("name")%>');
            })
            $("#a4").click(function () {
                $("#shopp").text('数码')
                $("#iframe").attr('src','jsp/ShoppShown.jsp?num=4&name=<%=request.getParameter("name")%>');
            })
        })
    </script>
</head>
<body>
<%--<p class="p1"> 欢迎你，亲爱的客户，请您登录！</p>--%>
<%--<p class="p2"> 欢迎你，亲爱的客户，请您开心的购物！</p>--%>
<div class="divone">
    <div class="divtwo">
<%--        <img style="margin-left: 750px;" class="icon" src="img/homePageOne.png">--%>
    </div>

    <div class="divthree">
        <%--        登录成功则显示购物车和个人中心--%>
        <%
            Object name = request.getParameter("name");
            if (name != null) {
        %>
            <span>欢迎<%=name%>用户</span><br>
            <a href="jsp/cart.jsp?name=<%=name%>&id=0">购物车</a>
            <span>&nbsp;|&nbsp;</span>
            <a href="jsp/individual.jsp?name=<%=name%>&acNum=<%=request.getParameter("acNum")%>">个人中心</a>
        <%
            }else{
        %>
        <a href="jsp/login.jsp?id=1">登录</a>
        <span>&nbsp;|&nbsp;</span>
        <a href="jsp/login.jsp?id=2">注册</a>
        <%
            }
        %>
    </div>
</div>
<hr>
<div class="divShopp">
    <a id="a1">首页</a>
    <a id="a2">书籍</a>
    <a id="a3">电脑</a>
    <a id="a4">数码</a>
</div>
<hr>
<div class="divAllShopp">
    <span style="margin-left: 10px" id="shopp">全部商品</span>
    <span class="allShopp">具体商品</span>
    <hr>
</div>
<div class="divFour">
    <iframe id="iframe" src="jsp/ShoppShown.jsp?num=1&name=<%=request.getParameter("name")%>" style="width: 1700px;height: 2650px" scrolling="no" frameborder="0">

    </iframe>
</div>
</body>
</html>
